package com.zhome.gateway.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zhome.gateway.constants.Constants;
import com.zhome.gateway.repository.entity.BlackListInfoEntity;
import com.zhome.gateway.repository.mapper.BlackListInfoMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

@Slf4j
@Service
public class BlackListInfoService extends ServiceImpl<BlackListInfoMapper, BlackListInfoEntity> {

    public List<BlackListInfoEntity> queryAll() {
        QueryWrapper<BlackListInfoEntity> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("del_flag", Constants.NOT_DEL_FLAG);
        List<BlackListInfoEntity> list = this.list(queryWrapper);
        return list;
    }
}
